# 指定CMake的最低编译版本
cmake_minimum_required(VERSION 3.5)

# 指定一个名字
project(hfsort)

# 设定编译参数
# 编译标准 -std= xx
set(CMAKE_CXX_STANDARD 11)
# 显示编译颜色
set(CMAKE_COLOR_MAKEFILE ON) 

# 设置二进制文件目录
set(BIN_DESTINATION ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BIN_DESTINATION})

add_definitions("-g")

# 设定头文件路径
include_directories(src)

FILE(GLOB SOURCE_FILES_CPP "${PROJECT_SOURCE_DIR}/src/*.cpp")
FILE(GLOB SOURCE_FILES_C "${PROJECT_SOURCE_DIR}/src/*.c")

message(STATUS "SOURCE_FILES:" ${SOURCE_FILES_CPP} ${SOURCE_FILES_C})

#生成可执行文件
add_executable(hfsort ${SOURCE_FILES_CPP} ${SOURCE_FILES_C})

# 将第三方的库链接到可执行文件（可选）(-lptread -lxx)
target_link_libraries(hfsort z)